public class Verktyg {

	public static void slumpOrdning(Object[] array) {

		Object[] newArray = new Object[array.length];

		for (int i = 0; i < array.length; i++) {
			boolean done = false;
			while (!done) {
				int rnd = (int) (Math.random() * array.length);
				if (newArray[rnd] == null) {
					newArray[rnd] = array[i];
					done = true;
				}
			}
		}
		for (int i = 0; i < array.length; i++) {
			array[i] = newArray[i];
		}
	}

}
